﻿@using GSLMS.WebAPP
@model GSLMS.Entity.TB_APP_PROTARINFO
@{
    Layout = null;
    var ddlRelation = ViewData["Relation"] as SelectList;    
}
<div class="pageContent">
    <form method="post" action="DianDang/Apply/ProInfo/TarInfoCreate?OpID=@ViewData["OperateID"]" class="pageForm required-validate"
    onsubmit="return validateCallback(this, TardialogAjaxDone)">
    @Html.ValidationSummary(true)
    <div class="pageFormContent" layouth="350">
        @Html.HiddenFor(model => model.ID)
        @Html.HiddenFor(model => model.PROID)
        @Html.HiddenFor(model => model.REGINFOID)
        <p>
            <label>
                共同借款人名称：</label>
            @Html.TextBoxFor(model => model.CUSTNAME, new { @class = "required" })
            @Html.ValidationMessageFor(model => model.CUSTNAME)
        </p>
        <p>
            <label>
                证件号码：</label>
            @Html.TextBoxFor(model => model.CUSTNO, new { @class = "required" })
            @Html.ValidationMessageFor(model => model.CUSTNO)
        </p>
        <p>
            <label>
                关系：</label>
            @Html.DropDownListFor(model => model.RELATION, ddlRelation, GSLMS.WebAPP.HelperCommon.SelectDefaultValue, new { @class = "combox", @selectedvalue = Model.RELATION })
            @Html.ValidationMessageFor(model => model.RELATION)
        </p>
        <p>
            <label>
                单位：</label>
            @Html.TextBoxFor(model => model.CORPNAME, new { @class = "" })
            @Html.ValidationMessageFor(model => model.CORPNAME)
        </p>
        <p style="width: 100%">
            <label>
                单位电话：</label>
            <span>
                @Html.TextBoxFor(model => model.TELCODE, new { @value = "0755", @style = "width:50px" })</span>
            <span>@Html.TextBoxFor(model => model.TEL, new { })</span> <span>@Html.TextBoxFor(model => model.TELSUB, new { @style = "width:50px", @alt = "分机号" })</span>
            <span>@Html.ValidationMessageFor(model => model.TEL)</span>
        </p>
        <p>
            <label>
                单位地址：</label>
            @Html.TextBoxFor(model => model.CORPADDR, new { @class = "" })
            @Html.ValidationMessageFor(model => model.CORPADDR)
        </p>
        <p>
            <label>
                住宅地址：</label>
            @Html.TextBoxFor(model => model.HOUADDR, new { @class = "" })
            @Html.ValidationMessageFor(model => model.HOUADDR)
        </p>
        <p style="width: 100%">
            <label>
                住宅电话：</label>
            @Html.TextBoxFor(model => model.HOUTELCODE, new { @value = "0755", @style = "width:50px" })
            @Html.TextBoxFor(model => model.HOUTEL, new { })
            @Html.ValidationMessageFor(model => model.HOUTEL)
        </p>
        <p>
            <label>
                手机1：</label>
            @Html.TextBoxFor(model => model.MOBILE1, new { @class = "" })
            @Html.ValidationMessageFor(model => model.MOBILE1)
        </p>
        <p>
            <label>
                手机2：</label>
            @Html.TextBoxFor(model => model.MOBILE2, new { @class = "" })
            @Html.ValidationMessageFor(model => model.MOBILE2)
        </p>
    </div>
    <div class="formBar">
        <ul>
            <li>
                <div class="buttonActive">
                    <div class="buttonContent">
                        <button type="button" onclick="SaveProTarInfoCreate(1)">
                            保存</button></div>
                </div>
                <div class="buttonActive" style="display: none;">
                    <div class="buttonContent">
                        <button type="button" onclick="SaveProTarInfoCreate(0)">
                            保存</button></div>
                </div>
                <button type="submit" name="btn_toSave" id="btn_toSave" style="display: none;">
                    保存</button>
            </li>
        </ul>
    </div>
    @Html.Hidden("CreateNewFlag", "0")
    </form>
</div>
<script>



    function TardialogAjaxDone(json) {

        DWZ.ajaxDone(json);
        if (json.statusCode == DWZ.statusCode.ok) {
            RefreshProTarInfoList();
            ToClearText();
        }
    }
    function ToClearText() {
        if (document.getElementById("CreateNewFlag").value == "1") {
            document.getElementById("CreateNewFlag").value = "0";
            RefreshProTarInfoCreate(0);
        }
    }
</script>
